<template>
  <button
    type="button"
    :class="btnClass"
    @click="clickHandler($event)"
    :disabled="disabled"
  >

    <slot></slot>

  </button>
</template>

<script>
    export default {
        name: "XjrButton",
        data(){
          return {
              btnClass:{
                  btn:true,
                  'btn-primary':true,
                  'btn-lg':this.size=='lg',
                  'btn-sm':this.size=='sm',
              }
          }
        },
        props:{
          disabled:Boolean,
          size:{
              type:String,
              default:""
          }
        },
        methods:{
            clickHandler(e){
                return this.$emit('clickEvent',e.target.innerHTML);

            }
        }
    }
</script>

<style scoped>

</style>
